package com.myway.core.common;
import java.util.HashMap;

/**
 * @author 陈志钢(zhg_ch)
 * 
 * @description
 * 
 * 代理人审核状态

 * 
 * @date 2008-10-30
 */
public enum AgentAuditStatus {

	APPLYING("申请中"), DAUDIT("营业部审批通过"),EAUDIT("电子商务中心审批通过"),FAUDIT("结算中心审批通过"),DENY("禁用");

	/**
	 * 别名
	 */
	private final String alias;
	private static HashMap<String, AgentAuditStatus> map = new HashMap<String, AgentAuditStatus>();
	

	static {
		for (AgentAuditStatus e : AgentAuditStatus.values()) {
			map.put(e.alias, e );
		}
	}
	/**
	 * @param alias alias
	 */
	AgentAuditStatus(String alias) {
		this.alias=alias;
	}
	/**
	 * @return String
	 */
	@Override
	public String toString() {
		return this.alias;

	}
	
	/**
	 * Return a <code>UserStatusConstants</code> object holding the value of specified alias name
	 * @param alias the alias name of the type
	 * @return a <code>AgentTypeEnum</code> object holding the value represented by the alias name argument
	 */
	public static AgentAuditStatus valueOfAlias(String alias) {
		AgentAuditStatus type = map.get(alias);

		if (type == null) {
			throw new IllegalArgumentException("Unknown Agent type enum alias [" + alias + "]");
		}

		return type;
	}			
}
